Repository navigation
0.10.14: exit-thinking: a local client that leaves during the hand-off gets no continuation row (stacked on #2061) - #2078
Merged
Conversation
…ts no continuation row (red) On the scheduler path, the local API's disconnect hook reaches only the splice's control: the splice's task keeps running, so the owner's `Task.checkCancellation()` after the stopped row's release wait passes, the continuation row is submitted, and only then cancelled (the fresh-context review of #2046 + #2061, m1). The test holds the first row's retirement (a row admitted against its deadline ends its stream before it releases its slot), disconnects the local client while the splice waits in `waitForRowRelease`, then releases the row: no continuation may be submitted. Red: the engine sees 2 requests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… continuation row `LoopExitThinkingContinuation.Submit` takes the splice's own cancel (`cancelled`). The scheduler checks it after the stopped row's release wait, beside its `Task.checkCancellation()`; Super's binding beside its `RowCancel`. A cancel that reaches only the splice's control (the local API's disconnect hook; on the native route, the hand-off's cancel) therefore submits nothing, instead of submitting the continuation and cancelling it at once (a wasted prefill of the prompt and the whole thought). A refusal that cancel caused ends the request as `length` with the outcome "cancelled". A splice-level test pins the owner's check; the existing hand-off test still shows that an owner that does not check is cancelled at once. Local: 54/54 (red 7da06f7: exactly the new serving test failed). Review (fresh context) of #2046 + #2061, m1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The review of #2078 (fresh context, APPROVE WITH NITS): - n1: a task cancel that reaches the owner's check before the splice's control is set (its `onTermination` cancels the task first) is logged as "cancelled", not "continuation refused". - n2: the serving test has a time limit, asserts the request ends `length` with no answer, and says why it waits 200 ms. - n3: the splice-level test pins the outcome ("cancelled"). - n4: the changelog fragment is scoped to the scheduler's text path (Super's route already behaved this way). Its m1 (join the splice before the scheduler returns the admission) is listed in the PR as not here: the release wait ignores cancellation, so a plain join could hold the release for up to 5 s. Local: 54/54. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dev's vision exit-thinking path (#2054) splices with the same submit as the text path; with this branch's three-argument Submit it now checks the task and the splice's cancel after the release wait, as the text path does.
…day's default families (delta review F1)
Collaborator
Author
|
Release owner (0.10.14, REL14): brought onto today's |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
0.10.14 follow-up, draft. Stacked on #2061 (which contains #2046): until both merge, the diff shows theirs too. Merge #2046, then #2061, then this.
The fresh-context review of #2046 + #2061 (
REVIEW-4, APPROVE WITH NITS) left two items for a follow-up, which this PR takes: M1 step 1 and N1.What
LoopExitThinkingContinuation.Submitgets a third argument,cancelled: the splice's own cancel, which the owner reads after its release wait.waitForRowReleaseand submit nothing once it is set:Task.checkCancellation();RowCancel. There it changes nothing: every cancel on that route already setsRowCancelfirst.CancellationError) ends the request aslengthwith the outcome "cancelled", not "continuation refused".Not here: REVIEW-4 M1 step 2, joining the splice before the scheduler returns the admission (
releaseBox.fire()).submitTokenizedstill gets a row that is submitted and then cancelled at once (markStarted→cancelContinuation). On the client-drop path that can happen just after the admission was returned.waitForRowReleaseignores cancellation, so a plain join could hold the release for up to 5 s. The join wants a release wait that also races the splice's cancel.Tests (red first)
7da06f7bdc(local): exactly the new serving test fails, "a local client that leaves while the stopped row releases its slot gets no continuation row" (the engine saw 2 requests). The other 52 pass.LocalRequestCancellationScope.cancel()) while the splice waits inwaitForRowRelease, then releases the row.lengthwith no answer, and it has a 1-min time limit.4f3584fdad, then the review's nits (ccb7f48d7b): 54/54 locally.4f3584fdad: APPROVE WITH NITS. Its nits are answered here, and its minor finding is the "Not here" above.Later
RowNotReleased, id 18) and route wiring.ends_thought(telemetry only).answerFinished, the continuation's checkpoint writes, outcome telemetry.